/*
 * @Author: your name
 * @Date: 2021-05-17 10:05:04
 * @LastEditTime: 2021-06-24 11:51:14
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \dolphin-data-center-front-end\src\services\employeeManage.js
 */
import {
  uploadExcelApiPath,
  confirmUploadApiPath,
  getLatestImportHistoryRecordApiPath,
  batchEntryPositionApiPath,
  employeeManageListApiPath,
  employeeDetailgetByIdApiPath,
  attachmentGetUserIdApiPath,
  entryByPitchApiPath,
  batchCancelEntryApiPath,
  projectGetListApiPath,
  downloadTempApiPath,
  employeeDimissionApiPath,
  downloadApiPath
} from './api'

// import Qs from 'qs'

import { METHOD, request } from '@/utils/request'

export function batchEntryPositionApi(params) {
  return request(batchEntryPositionApiPath, METHOD.POST, params)
}

export function uploadExcelApi(params, config) {
  return request(`${uploadExcelApiPath}`, METHOD.POST, params, config)
}

export function confirmUploadApi(params) {
  return request(confirmUploadApiPath, METHOD.POST, params)
}

export function getLatestImportHistoryRecordApi(params) {
  return request(getLatestImportHistoryRecordApiPath, METHOD.GET, params)
}

export function employeeManageListApi(params) {
  return request(employeeManageListApiPath, METHOD.POST, params)
}

export function employeeDetailgetByIdApi(params) {
  return request(employeeDetailgetByIdApiPath, METHOD.GET, params)
}

export function attachmentGetUserIdApi(params) {
  return request(attachmentGetUserIdApiPath, METHOD.GET, params)
}

export function entryByPitchApi(params) {
  // return request(entryByPitchApiPath, METHOD.POST, Qs.stringify(params))
  return request(`${entryByPitchApiPath}?ids=${params}`, METHOD.POST)
}

export function batchCancelEntryApi(params) {
  // return request(batchCancelEntryApiPath, METHOD.POST, Qs.stringify(params))
  return request(`${batchCancelEntryApiPath}?ids=${params}`, METHOD.POST)
}

export function projectGetListApi(params) {
  return request(projectGetListApiPath, METHOD.GET, params)
}

export function downloadTempApi(params) {
  return request(downloadTempApiPath, METHOD.GET, params)
}

export function employeeDimissionApi(params) {
  return request(employeeDimissionApiPath, METHOD.POST, params)
}

export function downloadApi(params) {
  return request(downloadApiPath, METHOD.POST, params)
}

export default {
  batchEntryPositionApi,
  uploadExcelApi,
  confirmUploadApi,
  employeeManageListApi,
  getLatestImportHistoryRecordApi,
  employeeDetailgetByIdApi,
  attachmentGetUserIdApi,
  entryByPitchApi,
  batchCancelEntryApi,
  projectGetListApi,
  downloadTempApi,
  downloadApi
}
